<?
    foreach ($this->types as $model_type)
    {
        $expand = (isset($this->expand_type_id)) && ($this->expand_type_id == $model_type->getID());
?>
<li class="has_content">
    <div class="node_pict <?=($expand ? " opened" : "closed")?>" id="company_<?=$this->model_company->getID() ?>_type_<?=$model_type->getID(); ?>" onClick="expandMenu({controller: 'viewbycompany', company_id: <?=$this->model_company->getID() ?>, type_id: <?=$model_type->getID(); ?>, level: EXPAND_VIEW_BY_COMPANY_IN_TYPE})"></div>
    <a href="" onClick="ajaxTypes({id: <?=$model_type->getID(); ?>, company_id: <?=$this->model_company->getID() ?>, action: 'short', container: 'inner', no_apply: true}); return false;"><nobr><?=$model_type->getCaption(); ?></nobr></a>
    <ul id="company_<?=$this->model_company->getID() ?>_type_<?=$model_type->getID(); ?>_content" <? if ($expand) echo "style=\"display: block;\""; ?>>
<?
        if ($expand)
            echo $this->expand;
?>
    </ul>
</li>
<?
    };
?>
<li class="add_item">
    <a href="" onClick="addItem({menu: 'device', container: 'inner', company_id: <?=$this->model_company->getID() ?>}); return false;">Add new device</a>
</li>